* {
  margin: 0;
  padding: 0;
}

body {
  background-color: darkgray;
}

#container {
  width: 600px;
  height: 500px;
  margin: 100px auto;
  border: 4px solid white;
  font-family: '楷体';
}

#container #main1 {
  width: 600px;
  height: 450px;
  position: relative;
}

#container #main1 img {
  width: 600px;
  height: 450px;
}

#main1 p {
  width: 600px;
  height: 450px;
  background-color: rgba(0, 0, 0, .6);
  position: absolute;
  top: 0;
  left: 0;
  color: white;
}

#main2 {
  width: 600px;
  height: 50px;
  padding-left: 10px;
}

#main2 input {
  width: 310px;
  height: 30px;
  margin-top: 10px;
  margin-left: 10px;
  border-style: groove;
  text-align: center;
  border: 1px solid #909399;
}

#main2 button {
  width: 60px;
  height: 30px;
  margin-top: 10px;
  cursor: pointer;
  background-color: dodgerblue;
  color: white;
  transition: all 1s;
  border: 1px solid #909399;
}

#main2 button:hover {
  background-color: deepskyblue;
  animation: shake .7s linear;
}

@keyframes shake {
  0% {
    transform: translateX(0);
  }

  10% {
    transform: translateX(-1px);
  }

  20% {
    transform: translateX(2px);
  }

  30% {
    transform: translateX(-4px);
  }

  40% {
    transform: translateX(4px);
  }

  50% {
    transform: translateX(-4px);
  }

  60% {
    transform: translateX(4px);
  }

  70% {
    transform: translateX(-4px);
  }

  80% {
    transform: translateX(2px);
  }

  90% {
    transform: translateX(-1px);
  }

  100% {
    transform: translateX(0);
  }
}